{
  "properties" : { },
  "id" : "4510d3a081af4578a6fefc64f5654947",
  "script" : null,
  "groupId" : "b3703296495946aabf6a72b7d085c5d6",
  "name" : "录入文件fps信息",
  "createTime" : null,
  "updateTime" : 1739537643005,
  "lock" : null,
  "createBy" : null,
  "updateBy" : "可辉",
  "path" : "set_file_fps",
  "method" : "GET",
  "parameters" : [ ],
  "options" : [ ],
  "requestBody" : "",
  "headers" : [ ],
  "paths" : [ ],
  "responseBody" : "{\n    \"code\": 200,\n    \"msg\": \"success\",\n    \"data\": [\n        {\n            \"id\": 74,\n            \"path\": \"E:\\\\video\\\\拍摄真人\\\\p-沈阳青年男女抓奸为名殴打并强迫发生性关系.mp4\",\n            \"name\": \"p-沈阳青年男女抓奸为名殴打并强迫发生性关系.mp4\",\n            \"size\": \"88\"\n        },\n        null\n    ]\n}",
  "description" : null,
  "requestBodyDefinition" : null,
  "responseBodyDefinition" : null
}
================================
import java.io.BufferedReader;
import java.io.InputStreamReader;
import log;

var datalist = db.table('file_videos').where().isNull('fps').select();

String ffmpeg_home = "D:/opt/ffmpeg/bin/";
String code1 = " -v error -select_streams v:0 -show_entries stream=r_frame_rate -of default=noprint_wrappers=1:nokey=1 ";

for (item in datalist) {
    String cmd = ""+ffmpeg_home+'ffprobe'+"" + code1 + "\""+item.path+"\"";
    Process process = Runtime.getRuntime().exec(cmd);
    BufferedReader stdInput = new BufferedReader(new InputStreamReader(process.getInputStream()));
    String fps;
    while ((s = stdInput.readLine()) != null) {
        fps = s.split('/')[0]
    }
    if(fps){
        db.table('file_videos').where().eq('id',item.id).update({'fps': fps});
    }
}

return 1